{assign var=filtersItemsPerRow value=3}

{if $content.contentFilters}
	<div class="filter-box">
		<div class="large p5"><b>Фильтры:</b></div>
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			{foreach from=$content.contentFilters item=filterGroup name="filterGroups"}
				{if !(($smarty.foreach.filterGroups.iteration-1) % $filtersItemsPerRow) || $smarty.foreach.filterGroups.first}
					{if !$smarty.foreach.filterGroups.first}
					</tr>
					{/if}
					<tr>
				{/if}
				<td width="33%" valign="top">
					<div class="filter-group-name">
						{$filterGroup.name|escape}:
						
						{if $filterGroup.description}
							<span class="params-description-shower" descr_id="{$filterGroup.id|escape}">
								<a href="javascript:;"><img src="{$SPIcfg.dir.pubsite_styles|escape}null.gif" class="params-icon-info" alt="info" {*align="absmiddle"*}/></a>
								<div id="param-description-{$filterGroup.id|escape}" class="params-info-box">
									<div class="params-info-box-arrow"></div>
									{$filterGroup.description|escape|nl2br}
								</div>
							</span>
						{/if}
					</div>
					
					{foreach from=$filterGroup.filters item=filter}
						{if $filter.isSelected}
							<a href="{$filter.link|escape}" class="filter-caption filter-caption-selected">
								<img src="{$SPIcfg.dir.pubsite_styles|escape}front/image/icons/icon.filter.remove.png" align="top" width="13px" height="13px"/>
								{$filter.name|escape}
							</a>
						{elseif $filter.isEnabled}
							<a href="{$filter.link|escape}" class="filter-caption">
								<img src="{$SPIcfg.dir.pubsite_styles|escape}front/image/icons/icon.filter.plus.png" align="top" width="12px" height="12px" style="padding:1px 0px 0px 1px;"/>
								{$filter.name|escape}
								{if $filterGroup.isShowCountDifference && $filter.countDifference}
									(+{$filter.countDifference|escape})
								{else}
									({$filter.count|escape})
								{/if}
							</a>
						{else}
							<span class="filter-caption filter-caption-disabled" title="Нет подходящих элементов">
								<img src="{$SPIcfg.dir.pubsite_styles|escape}front/image/icons/icon.filter.minus.png" align="top" width="11px" height="11px" style="padding:2px 0px 0px 1px;"/> 
								{$filter.name|escape} ({$filter.count|escape})
							</span>
						{/if}
					{/foreach}
					<div class="pb5"></div>
				</td>
				{if $smarty.foreach.filterGroups.last}
					</tr>
				{/if}
			{/foreach}
		</table>
	</div>
{/if}